package cn.adviceclient.config;

import cn.adviceclient.AdviceClient;
import com.google.gson.JsonObject;

import java.io.File;

public class Config {
    private final File file;
    private static String name = "";

    public Config(String name) {
        this.name = name;
        File configDir = new File(AdviceClient.INSTANCE.getMainDirectory().toFile(), "config");
        if (!configDir.exists()) {
            configDir.mkdirs();
        }
        this.file = new File(configDir, name + ".json");
    }

    public void loadConfig(JsonObject object){

    }

    public JsonObject saveConfig(){
        return null;
    }

    public File getFile() {
        return file;
    }

    public static String getName() {
        return name;
    }
}
